﻿
@model WebUI.Models.PassWordModifyModel
<div class="div_center">

    @using (Html.BeginForm("", "", FormMethod.Post, new { id = "PassWordModifyfm", name = "PassWordModifyfm" }))
    {
        <fieldset class="datebox-button" style="height: auto; text-align: left; padding-top: 8px;
            padding-right: 8px; padding-bottom: 8px; padding-left: 8px;">
            <legend class="panel-title">密码修改</legend>
            <table class="TableBlock">
                <tr>
                    <td class="TableLabel">
                      
                        用户名：
                    </td>
                    <td class="TableData">
                        @Html.TextBoxFor(model => model.UserName)
                    </td>
                </tr>
                <tr>
                    <td class="TableLabel">原密码：
                    </td>
                    <td class="TableData">
                        @Html.PasswordFor(model => model.OldPassWord)
                    </td>
                </tr>
                <tr>
                    <td class="TableLabel">新密码：
                    </td>
                    <td class="TableData">
                        @Html.PasswordFor(model => model.NewPassWord)
                    </td>
                </tr>
                <tr>
                    <td class="TableLabel">新密码确认：
                    </td>
                    <td class="TableData">
                        @Html.PasswordFor(model => model.ConfirmPassWord)
                    </td>
                </tr>
            </table>
        </fieldset>
    }

</div>

<script>
    $(function ()
    {
        //定义验证规则
        $("#UserName",$("#PassWordModifyfm")).attr("readonly", "readonly").addClass("BigStatic");

        $("#OldPassWord,#NewPassWord,#ConfirmPassWord", $("#PassWordModifyfm")).validatebox({
            required: true,
            validType: ['maxLength[16]']
        });

        $("#ConfirmPassWord", $("#PassWordModifyfm")).validatebox({
            required: true,
            validType: "equals['#NewPassWord']"
        });
    })

</script>
